package com.yww.controller;


import com.yww.entity.Results;
import com.yww.entity.ResultsParam;
import com.yww.mapper.ResultsMapper;
import com.yww.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 雯雯yang
 * @since 2020-06-21
 */
@RestController
@RequestMapping("/results")
public class ResultsController {

    @Autowired
    ResultsMapper resultsMapper;

    /**
     * 查询业绩
     * @param resultsParam
     * @return
     */
    @RequestMapping("/getResults")
    public Object getResults(ResultsParam resultsParam) {
        List<Results> list = resultsMapper.getList(resultsParam);
        resultsParam.setPage(null);
        resultsParam.setLimit(null);
        List<Results> list1 = resultsMapper.getList(resultsParam);
        return new Result(0, "success",list1.size(), list);
    }


}
